# 导入Selector类
from parsel import Selector
#初始化html字符串
html='''
         <div>
           <ul>
   	<li class="item-0">首页</li>
<li class="item-1"><a href="introduce.html">概况</a></li>
   	<li class="item-0 active"><a href="new.html"><span class="bold">新闻   	
	</span></a></li>
   	<li class="item-1 active"><a href="notice.html">公告</a></li>
 	 <li class="item-0"><a href="about.html">联系我们</a></li>
</ul>
        </div>
      '''
#创建selector对象
selector=Selector(html)
#使用CSS提取class包含item-0的节点
items = selector.css('.item-0')
for item in items:
	text=item.xpath('.//text()').get()
print(text)

